oracle.pgx.api

## Class PgxCollection<E extends PgxEntity<ID>,ID extends Comparable<ID>>

- java.lang.Object
- - oracle.pgx.api.Destroyable
  - - oracle.pgx.api.PgxManagedObject
    - - oracle.pgx.api.PgxCollection<E,ID>

- Type Parameters:
    `E` - the element type
    `ID` - the ID type of the element type
  All Implemented Interfaces:
    AutoCloseable, Iterable<E>
  Direct Known Subclasses:
    EdgeCollection, VertexCollection

      public abstract class PgxCollection<E extends PgxEntity<ID>,ID extends Comparable<ID>>
      extends PgxManagedObject
      implements Iterable<E>

  A collection vertices/edges.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAll(Collection<E> source)` Blocking version of `#addAllAsync()`.
    `void` | `addAll(E[] elements)` Blocking version of `#addAllAsync()`.
    `abstract void` | `addAll(ID... ids)`
    `PgxFuture<Void>` | `addAllAsync(Collection<E> source)` Add vertices/edges to an existing vertex/edge collection
    `PgxFuture<Void>` | `addAllAsync(E[] elements)` Add vertices/edges to an existing vertex/edge collection
    `void` | `clear()` Blocking version of `clearAsync()`.
    `PgxFuture<Void>` | `clearAsync()` Clear an existing vertex/edge collection
    `PgxCollection<E,ID>` | `clone()`
    `PgxCollection<E,ID>` | `clone(String newName)`
    `PgxFuture<PgxCollection<E,ID>>` | `cloneAsync()` Convenience method around `cloneAsync(String)` passing name as `null` Clone an existing vertex/edge collection.
    `PgxFuture<PgxCollection<E,ID>>` | `cloneAsync(String newName)` Clone an existing vertex/edge collection.
    `CollectionType` | `getCollectionType()` Gets the collection type.
    `EntityType` | `getElementType()` Gets the element type.
    `PgxGraph` | `getGraph()` Gets the graph.
    `String` | `getName()`
    `Iterator<E>` | `iterator()` Blocking version of `iteratorAsync()`.
    `PgxFuture<Iterator<E>>` | `iteratorAsync()` Gets an Iterator over the collection.
    `void` | `removeAll(Collection<E> source)` Blocking version of `#removeAllAsync()`.
    `abstract void` | `removeAll(ID... ids)`
    `PgxFuture<Void>` | `removeAllAsync(Collection<E> source)` Remove vertices/edges from an existing vertex/edge collection
    `int` | `size()` Blocking version of `sizeAsync()`.
    `PgxFuture<Integer>` | `sizeAsync()` Gets the number of elements in this collection
    `String` | `toString()`

    - ### Methods inherited from class oracle.pgx.api.PgxManagedObject

      `equals, hashCode`

    - ### Methods inherited from class oracle.pgx.api.Destroyable

      `close, destroy, destroyAsync`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### addAll

          @Generated(value="src/python/synchronize.py")
          public void addAll(Collection<E> source)
                      throws ExecutionException,
                             InterruptedException

      Blocking version of `#addAllAsync()`. Calls `#addAllAsync()` and waits for the returned `PgxFuture` to complete.
      Throws:
        `InterruptedException` - if the caller thread gets interrupted while waiting for completion.
        `ExecutionException` - if any exception occurred during asynchronous execution. The actual exception will be nested.

    - #### addAll

          @Generated(value="src/python/synchronize.py")
          public void addAll(E[] elements)
                      throws ExecutionException,
                             InterruptedException

      Blocking version of `#addAllAsync()`. Calls `#addAllAsync()` and waits for the returned `PgxFuture` to complete.
      Throws:
        `InterruptedException` - if the caller thread gets interrupted while waiting for completion.
        `ExecutionException` - if any exception occurred during asynchronous execution. The actual exception will be nested.

    - #### addAll

          public abstract void addAll(ID... ids)
                               throws ExecutionException,
                                      InterruptedException

      Throws:
        `ExecutionException`
        `InterruptedException`

    - #### addAllAsync

          public PgxFuture<Void> addAllAsync(Collection<E> source)

      Add vertices/edges to an existing vertex/edge collection
      Parameters:
        `source` - vertices/edges to add

    - #### addAllAsync

          public PgxFuture<Void> addAllAsync(E[] elements)

      Add vertices/edges to an existing vertex/edge collection
      Parameters:
        `elements` - vertices/edges to add

    - #### clear

          @Generated(value="src/python/synchronize.py")
          public void clear()
                     throws ExecutionException,
                            InterruptedException

      Blocking version of `clearAsync()`. Calls `clearAsync()` and waits for the returned `PgxFuture` to complete.
      Throws:
        `InterruptedException` - if the caller thread gets interrupted while waiting for completion.
        `ExecutionException` - if any exception occurred during asynchronous execution. The actual exception will be nested.

    - #### clearAsync

          public PgxFuture<Void> clearAsync()

      Clear an existing vertex/edge collection

    - #### clone

          public PgxCollection<E,ID> clone()

      Overrides:
        `clone` in class `Object`

    - #### clone

          public PgxCollection<E,ID> clone(String newName)
                                                                                 throws InterruptedException,
                                                                                        ExecutionException

      Throws:
        `InterruptedException`
        `ExecutionException`

    - #### cloneAsync

          public PgxFuture<PgxCollection<E,ID>> cloneAsync()

      Convenience method around `cloneAsync(String)` passing name as `null`
      Clone an existing vertex/edge collection.
      Returns:
        the cloned collection

    - #### cloneAsync

          public PgxFuture<PgxCollection<E,ID>> cloneAsync(String newName)

      Clone an existing vertex/edge collection.
      Parameters:
        `newName` - name of the new collection
      Returns:
        the cloned collection

    - #### getCollectionType

          public CollectionType getCollectionType()

      Gets the collection type.
      Returns:
        the collection type

    - #### getElementType

          public EntityType getElementType()

      Gets the element type.
      Returns:
        the element type

    - #### getGraph

          public PgxGraph getGraph()

      Gets the graph.
      Returns:
        the graph this PgxCollection is bound to

    - #### getName

          public String getName()

      Specified by:
        `getName` in class `PgxManagedObject`
      Returns:
        the name identifying this managed object

    - #### iterator

          @Generated(value="src/python/synchronize.py")
          public Iterator<E> iterator()

      Blocking version of `iteratorAsync()`. Calls `iteratorAsync()` and waits for the returned `PgxFuture` to complete.
      Specified by:
        `iterator` in interface `Iterable<E extends PgxEntity<ID>>`
      Throws:
        `InterruptedException` - if the caller thread gets interrupted while waiting for completion.
        `ExecutionException` - if any exception occurred during asynchronous execution. The actual exception will be nested.

    - #### iteratorAsync

          public PgxFuture<Iterator<E>> iteratorAsync()

      Gets an Iterator over the collection.
      Returns:
        an Iterator over the collection

    - #### removeAll

          @Generated(value="src/python/synchronize.py")
          public void removeAll(Collection<E> source)
                         throws ExecutionException,
                                InterruptedException

      Blocking version of `#removeAllAsync()`. Calls `#removeAllAsync()` and waits for the returned `PgxFuture` to complete.
      Throws:
        `InterruptedException` - if the caller thread gets interrupted while waiting for completion.
        `ExecutionException` - if any exception occurred during asynchronous execution. The actual exception will be nested.

    - #### removeAll

          public abstract void removeAll(ID... ids)
                                  throws ExecutionException,
                                         InterruptedException

      Throws:
        `ExecutionException`
        `InterruptedException`

    - #### removeAllAsync

          public PgxFuture<Void> removeAllAsync(Collection<E> source)

      Remove vertices/edges from an existing vertex/edge collection
      Parameters:
        `source` - vertices/edges to remove

    - #### size

          @Generated(value="src/python/synchronize.py")
          public int size()
                   throws ExecutionException,
                          InterruptedException

      Blocking version of `sizeAsync()`. Calls `sizeAsync()` and waits for the returned `PgxFuture` to complete.
      Throws:
        `InterruptedException` - if the caller thread gets interrupted while waiting for completion.
        `ExecutionException` - if any exception occurred during asynchronous execution. The actual exception will be nested.

    - #### sizeAsync

          public PgxFuture<Integer> sizeAsync()

      Gets the number of elements in this collection
      Returns:
        number of elements in this collection

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `PgxManagedObject`

Copyright © 2015. All rights reserved.